/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ereconquista.modelo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Claudio
 */
@Entity
@Table(name = "tarifa_empresas", catalog = "ereconquista", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TarifaEmpresa.findAll", query = "SELECT t FROM TarifaEmpresa t"),
    @NamedQuery(name = "TarifaEmpresa.findById", query = "SELECT t FROM TarifaEmpresa t WHERE t.id = :id"),
    @NamedQuery(name = "TarifaEmpresa.findByFecha", query = "SELECT t FROM TarifaEmpresa t WHERE t.fecha = :fecha"),
    @NamedQuery(name = "TarifaEmpresa.findByDescrip", query = "SELECT t FROM TarifaEmpresa t WHERE t.descrip = :descrip"),
    @NamedQuery(name = "TarifaEmpresa.findByMonto", query = "SELECT t FROM TarifaEmpresa t WHERE t.monto = :monto"),
    @NamedQuery(name = "TarifaEmpresa.findByCantavisos", query = "SELECT t FROM TarifaEmpresa t WHERE t.cantavisos = :cantavisos"),
    @NamedQuery(name = "TarifaEmpresa.findByActiva", query = "SELECT t FROM TarifaEmpresa t WHERE t.activa = :activa"),
    @NamedQuery(name = "TarifaEmpresa.findByFkMoneda", query = "SELECT t FROM TarifaEmpresa t WHERE t.fkMoneda = :fkMoneda"),
    @NamedQuery(name = "TarifaEmpresa.findByCantdias", query = "SELECT t FROM TarifaEmpresa t WHERE t.cantdias = :cantdias"),
    @NamedQuery(name = "TarifaEmpresa.findByUrlPago", query = "SELECT t FROM TarifaEmpresa t WHERE t.urlPago = :urlPago")})
public class TarifaEmpresa implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Long id;
    @Basic(optional = false)
    @Column(nullable = false)
    @Temporal(TemporalType.DATE)
    private Date fecha;
    @Basic(optional = false)
    @Column(nullable = false, length = 255)
    private String descrip;
    @Basic(optional = false)
    @Column(nullable = false)
    private double monto;
    @Basic(optional = false)
    @Column(nullable = false)
    private long cantavisos;
    @Basic(optional = false)
    @Column(nullable = false, length = 1)
    private String activa;
    @Basic(optional = false)
    @Column(name = "fk_moneda", nullable = false)
    private long fkMoneda;
    @Basic(optional = false)
    @Column(nullable = false)
    private int cantdias;
    @Basic(optional = false)
    @Column(name = "url_pago", nullable = false, length = 500)
    private String urlPago;

    public TarifaEmpresa() {
    }

    public TarifaEmpresa(Long id) {
        this.id = id;
    }

    public TarifaEmpresa(Long id, Date fecha, String descrip, double monto, long cantavisos, String activa, long fkMoneda, int cantdias, String urlPago) {
        this.id = id;
        this.fecha = fecha;
        this.descrip = descrip;
        this.monto = monto;
        this.cantavisos = cantavisos;
        this.activa = activa;
        this.fkMoneda = fkMoneda;
        this.cantdias = cantdias;
        this.urlPago = urlPago;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public String getDescrip() {
        return descrip;
    }

    public void setDescrip(String descrip) {
        this.descrip = descrip;
    }

    public double getMonto() {
        return monto;
    }

    public void setMonto(double monto) {
        this.monto = monto;
    }

    public long getCantavisos() {
        return cantavisos;
    }

    public void setCantavisos(long cantavisos) {
        this.cantavisos = cantavisos;
    }

    public String getActiva() {
        return activa;
    }

    public void setActiva(String activa) {
        this.activa = activa;
    }

    public long getFkMoneda() {
        return fkMoneda;
    }

    public void setFkMoneda(long fkMoneda) {
        this.fkMoneda = fkMoneda;
    }

    public int getCantdias() {
        return cantdias;
    }

    public void setCantdias(int cantdias) {
        this.cantdias = cantdias;
    }

    public String getUrlPago() {
        return urlPago;
    }

    public void setUrlPago(String urlPago) {
        this.urlPago = urlPago;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TarifaEmpresa)) {
            return false;
        }
        TarifaEmpresa other = (TarifaEmpresa) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ereconquista.modelo.TarifaEmpresa[ id=" + id + " ]";
    }
    
}
